package io.kimmking.rpcfx.exception;

public class RpcException extends Exception{

    public RpcException() {
        super();
    }

    public RpcException(String message) {
        super(message);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public enum TYPE{
        PARAMS_ERROR,
        PARSING_ERROR,
        SERVER_ERROR
    }

    private TYPE type = TYPE.SERVER_ERROR;

    public TYPE getType() {
        return type;
    }

    public RpcException setType(TYPE type) {
        this.type = type;
        return this;
    }
}
